package com.suixinsanren.design.proxy.study.gumball;

import org.junit.Test;

public class GumballMachineTestDrive {

    @Test
    public void test02() {
        test01(new String[]{"Seattle", "112"});
    }

    public void test01(String[] args) {
        int count = 0;
        if (args.length < 2) {
            System.out.println("GumballMachine <name> <inventory>");
            System.exit(1);
        }
        count = Integer.parseInt(args[1]);
        GumballMonitor gumballMonitor = new GumballMonitor(new GumballMachine(args[0], count));
        gumballMonitor.report();
    }
}
